const express = require('express')
const router = express.Router()

const {htmlToPdfModel} = require('../controlls/htmlToPdfModel')
router.get('/', async (req, res, next) => {
  try {
    const pdfData = await htmlToPdfModel()
    res.send({
      status: 'success',
      msg: '',
      data: pdfData
    })
  } catch (err) {
    res.send({
      status: 'fail',
      msg: '',
      data: {}
    })
  }

})

module.exports = router